<?php
$table = $this->uri->segment(3,0);
$url_ajax = base_url().'admin/ajax_field/order';
$url_ajax_sotrang = base_url().'admin/ajax_field/num';
$url_ajax_pub = base_url().'admin/ajax_field/pub/'.$table;
$url_ajax_where = base_url().'admin/ajax_field/where/'.$table;
?>
<div id="main-content">
    <div class="container">
    	<div class="row">
    		<div id="content" class="col-lg-12">
    			<!-- PAGE HEADER-->
                    <div class="row">
							<div class="col-sm-12">
								<div class="page-header">
									<div class="clearfix">
										<h3 class="content-title pull-left">Quản lí Ý kiến</h3>
									</div>
								</div>
							</div>
					</div>
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="row">
                          <div class="col-md-12" style="background: #fff;">
                            <?php if(!empty($data)) {
                                foreach ($data as $data)
                                {
                                $datainfo =$this->common_model->getone('users',array('id'=>$data->userid));
                                $datatutor =$this->common_model->getone('users',array('id'=>$data->tutorid));
                                if(!empty($datainfo))
                                    {      
                            ?>
                            <div class="search-results" style="border-bottom: 1px dashed #ccc;padding-bottom:15px;">
                                  <h4><a href="<?php echo base_url().'admin/xuly/rating_des/edit/'.$data->id; ?>"><?php echo $data->title; ?></a></h4>
                                  <div class="url">Được đăng bởi : <?php echo $datainfo->name; ?> ---    <i class="fa fa-eye"></i> &nbsp;&nbsp;Trạng thái : <?php if($data->publish == 0) {echo '<font style="color:red;"> Ẩn</font>';} else {echo '<font style="color:blue;"> Hiện</font>';} ?>&nbsp;&nbsp;&nbsp;Được đánh giá tại trang gia sư <a href="<?php echo base_url().'thong-tin-gia-su.'.$datatutor->id.'.html'; ?>" title="">&nbsp;&nbsp;<?php echo $datatutor->name; ?></a>&nbsp;&nbsp;&nbsp;<a href="<?php echo base_url().'admin/xuly/rating_des/edit/'.$data->id; ?>"><i class="fa fa-edit"></i>&nbsp;&nbsp;Sửa</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo base_url().'admin/xuly/rating_des/xoa/'.$data->id; ?>" onclick="return confirm('Bạn có muốn xóa không?');"><i class="fa fa-edit"></i>&nbsp;&nbsp;Xóa</a></div>
                                  <p><?php echo strip_tags($data->description,'<b><i><a>') ?></p>
                            </div>
                            <?php }}} ?>
                            <div>
                             <?php echo $this->pagination->create_links();?>
                            </div>
                          </div>
                        </div>
                        </div>
                    </div>
   			</div>
    			<!-- /PAGE HEADER -->
    		</div>
    	</div>
</div>